<template>
  <div class="main-content">
    <div class="header-section">
      <h2>专属原创写歌作曲</h2>
      <div class="suggestion-boxes">
        <div class="suggestion-box">
          创作一首下雨天听的歌曲
          <span class="arrow-down">↓</span>
        </div>
        <div class="suggestion-box">
          创作一首关于想你的、甜甜的歌曲
          <span class="arrow-down">↓</span>
        </div>
        <div class="suggestion-box">
          创作一首关于父亲的感人歌曲，男声
          <span class="arrow-down">↓</span>
        </div>
      </div>
      <div class="creation-input-area">
        <input type="text" placeholder="描述你想要的音乐风格和主题，例如“一首关于生活的民谣吉他”" />
        <button class="create-button">
          <span class="icon">✨</span> 创作
        </button>
      </div>
    </div>

    <div class="music-section">
      <div class="section-header">
        <h3>潮流榜单</h3>
        <a href="#" class="show-more">Show more+</a>
      </div>
      <div class="music-grid">
        <!-- Placeholder for song cards -->
        <div class="song-card">
          <img src="https://via.placeholder.com/150/771796" alt="Song Cover" />
          <div class="song-info">
            <h4>I LOVE MY SMALL LITTLE CAT</h4>
            <p class="artist"><span>👤</span> 匿名Z声</p>
            <p class="tags">melodic, progressive metal, synth, nu metal</p>
          </div>
          <span class="rank">#1</span>
        </div>
        <div class="song-card">
          <img src="https://via.placeholder.com/150/24f355" alt="Song Cover" />
          <div class="song-info">
            <h4>中国</h4>
            <p class="artist"><span>👤</span> 北冥有鲲</p>
            <p class="tags">Pop, Chinese style, hip-hop, rap, classic rock, new pop, bass, environmental music, song and dance...</p>
          </div>
           <span class="rank">#2</span>
        </div>
        <div class="song-card">
          <img src="https://via.placeholder.com/150/d32776" alt="Song Cover" />
          <div class="song-info">
            <h4>足球少年</h4>
            <p class="artist"><span>👤</span> 像梦初觉</p>
            <p class="tags">electronic music, emotion, glamorous rock, cheerful, magnificent.</p>
          </div>
           <span class="rank">#3</span>
        </div>
        <div class="song-card small">
          <img src="https://via.placeholder.com/80/f66b97" alt="Song Cover" />
          <div class="song-info">
            <h4>松弛的内心派</h4>
            <p class="artist"><span>👤</span> 小清晰的声音</p>
            <p class="tags">管弦，氛围乐</p>
          </div>
        </div>
         <div class="song-card small">
          <img src="https://via.placeholder.com/80/56a8c2" alt="Song Cover" />
          <div class="song-info">
            <h4>要找我请走</h4>
            <p class="artist"><span>👤</span> 像住九天</p>
            <p class="tags">Electronic dance music, high-energy, burst of vitality, Death C...</p>
          </div>
        </div>
         <div class="song-card small">
          <img src="https://via.placeholder.com/80/b0f7cc" alt="Song Cover" />
          <div class="song-info">
            <h4>校园</h4>
            <p class="artist"><span>👤</span> 减减碎碎念</p>
            <p class="tags">轻摇滚、流行、另类、欢快</p>
          </div>
        </div>
      </div>
    </div>

    <div class="music-section">
       <div class="section-header">
        <h3>最新音乐</h3>
        <a href="#" class="show-more">Show more+</a>
      </div>
       <div class="music-grid">
         <!-- Placeholder for more song cards -->
         <div class="song-card small">
          <img src="https://via.placeholder.com/80/51aa97" alt="Song Cover" />
          <div class="song-info">
            <h4>三千昼夜存在</h4>
            <p class="artist"><span>👤</span> 归来雨听</p>
            <p class="tags">Chinese-style, drums, guitar, guzji</p>
          </div>
        </div>
         <div class="song-card small">
          <img src="https://via.placeholder.com/80/810b14" alt="Song Cover" />
          <div class="song-info">
            <h4>打PP还流水</h4>
            <p class="artist"><span>👤</span> 谁在敲打忆水年华</p>
            <p class="tags">Male voice, heavy metal, anger</p>
          </div>
        </div>
         <div class="song-card small">
          <img src="https://via.placeholder.com/80/1ee8a4" alt="Song Cover" />
          <div class="song-info">
            <h4>霓虹刺眼</h4>
            <p class="artist"><span>👤</span> 摸摸鱼安</p>
            <p class="tags">Male voice, rap, rhythm and blues, electronic music, epic, disc...</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MainContent',
};
</script>

<style scoped>
.main-content {
  margin-left: 240px; /* Same width as sidebar */
  padding: 30px 40px 100px 40px; /* Added bottom padding for player */
  background-color: #0d0d0d; /* Very dark background */
  color: #ccc;
  min-height: 100vh;
  box-sizing: border-box;
}

.header-section h2 {
  color: #fff;
  font-size: 1.8em;
  margin-bottom: 25px;
}

.suggestion-boxes {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.suggestion-box {
  flex: 1;
  background-color: #1f1f1f; /* Darker grey boxes */
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 0.9em;
  color: #aaa;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
  padding-right: 40px; /* Space for arrow */
}

.suggestion-box:hover {
  background-color: #2a2a2a;
}

.arrow-down {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  color: #666;
}

.creation-input-area {
  display: flex;
  background-color: #1f1f1f;
  border-radius: 25px; /* Rounded input area */
  padding: 5px;
  margin-bottom: 40px;
}

.creation-input-area input {
  flex-grow: 1;
  background: none;
  border: none;
  outline: none;
  color: #ccc;
  padding: 10px 20px;
  font-size: 0.95em;
}

.creation-input-area input::placeholder {
  color: #666;
}

.create-button {
  background-color: #f5a623; /* Orange button */
  color: #1a1a1a;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.create-button:hover {
  background-color: #e49613;
}

.create-button .icon {
  font-size: 1.1em;
}

.music-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  color: #fff;
  font-size: 1.4em;
  margin: 0;
}

.show-more {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9em;
}

.show-more:hover {
  color: #fff;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
  gap: 20px;
}

.song-card {
  background-color: #1f1f1f;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center; /* Align items vertically for large cards */
  padding: 15px;
  position: relative; /* For rank positioning */
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.song-card:hover {
  background-color: #2a2a2a;
}

.song-card img {
  width: 80px; /* Default size */
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 15px;
}

.song-card.small img {
   width: 60px; /* Smaller image for small cards */
   height: 60px;
}

/* Adjust layout for large cards (first 3) */
.music-grid > .song-card:nth-child(-n+3) {
  grid-column: span 1; /* Ensure they take up one column */
  padding: 20px; /* More padding */
}
.music-grid > .song-card:nth-child(-n+3) img {
  width: 100px; /* Larger image */
  height: 100px;
}

/* Adjust layout for small cards */
.song-card.small {
  /* Small cards might span less width if needed, but auto-fill handles this well */
   padding: 10px 15px;
}


.song-info {
  flex-grow: 1;
  overflow: hidden; /* Prevent text overflow */
}

.song-info h4 {
  color: #fff;
  font-size: 1.1em;
  margin: 0 0 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-card.small .song-info h4 {
  font-size: 1em; /* Slightly smaller title for small cards */
}


.song-info .artist {
  color: #aaa;
  font-size: 0.9em;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.song-card.small .song-info .artist {
  font-size: 0.85em;
  margin-bottom: 5px;
}

.song-info .tags {
  color: #777;
  font-size: 0.8em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-card.small .song-info .tags {
  font-size: 0.75em;
}

.rank {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Specific styling for the first 3 cards based on image */
.music-grid > .song-card:nth-child(1) { background-color: #3a3a3a; }
.music-grid > .song-card:nth-child(2) { background-color: #4a4a4a; }
.music-grid > .song-card:nth-child(3) { background-color: #5a5a5a; }

/* Adjust grid for smaller cards to potentially fit more per row */
/* This might need tweaking based on exact desired layout */
@media (min-width: 1200px) {
  .music-grid {
    /* Example: Allow up to 4 small cards per row on wider screens */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
   /* Ensure large cards still look good */
  .music-grid > .song-card:nth-child(-n+3) {
     min-width: 300px; /* Give large cards a bit more minimum space */
  }
}

</style>